<html>
  <head>
    <script src="https://cdn.socket.io/4.6.0/socket.io.min.js"></script>
    <script>
      const socket = io("http://localhost:3000");
      socket.on("connect", function () {
        console.log("Connected");

        socket.emit(
          "list-contents",
          { environmentId: "clnoig3eg0005f7dkasyhrq56" },
          (response) => console.log("events:", response)
        );
        socket.emit("identity", 0, (response) =>
          console.log("Identity:", response)
        );
      });
      socket.on("list-contents", function (data) {
        console.log("list-contents", data);
      });
      socket.on("exception", function (data) {
        console.log("event", data);
      });
      socket.on("disconnect", function () {
        console.log("Disconnected");
      });
    </script>
  </head>

  <body></body>
</html>
